//
//  ToolUtil.h
//  GXWN
//
//  Created by iMacOne on 15/11/5.
//  Copyright © 2015年 UNOHACHA. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
@class RootViewController;
@interface ToolUtil : NSObject
@property (nonatomic, strong) UITextField *commbox;// 创建既能输入又能下拉的组合框
@property (nonatomic, strong) UIScrollView *commboxItemView;// 组合框的选项视图
@property (nonatomic, strong) UIButton *commboxCoverView;// 组合框的遮盖层
@property (nonatomic, strong) UIView *commboxParent;// 组合框的父视图
@property (nonatomic, strong) NSMutableArray *commboxArray;// 组合框的数据
@property (nonatomic, strong) RootViewController *commboxControl;// 组合框的控制器
@property (nonatomic, strong) UIImageView *commboxIcon;// 组合框的图标变化
@property (nonatomic, assign) CGRect commboxPanelFrame;
@property (nonatomic, strong) NSTimer * commboxTimer;
@property (nonatomic, strong) UIButton * sendBtn;

////UIAlertController
//+ (void) creatAlertView:(NSArray *)array control:(UIViewController *)control callback:(ResponseCallback)callback;

//发送验证码
//- (void)pressverify:(NSString *)number control:(UIViewController *)control button:(UIButton *)btn;

//- (void)prompt:(NSString*)msg view:(UIView *)aView;


#pragma mark 判断字符串是否为空
+ (BOOL) isBlank:(NSString *)string;
//判断字符串是否是电话号码
+ (BOOL)isPhoneNumber:(NSString *)phoneString;
#pragma mark 获得字符串的字节长度(一个中文两个字节)
+ (int)getStrLen:(NSString*)text;
+ (UIImage *)getImage;
//分享
+ (void)share:(NSString*)title content:(NSString*)content url:(NSString*)url image:(id)image view:(UIView*)view control:(UIViewController*)control;
// 随机色
+ (UIColor*)randomColor;
//表单中的横线
+ (float)createLine:(float)y superView:(UIView*)view lift:(float)lift width:(float)width hight:(float)hight color:(UIColor *)color;
//表单中的竖线
+ (float)createVerticalLine:(float)y superView:(UIView*)view lift:(float)lift height:(float)height;
+ (void)createHLine:(UIView *)y superView:(UIView*)view lift:(float)lift width:(float)width hight:(float)hight color:(UIColor *)color;
////创建图片加标题的view
//+ (void)creatView:(NSString *)imageStr title:(NSString *)lblStr width:(CGFloat)width ;

#pragma mark 打电话
//+ (void)callPhone:(RootViewController *)control phone:(NSString*)phone;
//自适应高度
+ (CGFloat)customAutoHeigh:(NSString *)contentString width:(CGFloat)width num:(CGFloat)num;

//自适应宽度
+ (CGFloat)autoWidth:(NSString *)nameString width:(CGFloat)width height:(CGFloat)height num:(CGFloat)num;
+ (CGSize)autoWidth1:(NSString *)nameString width:(CGFloat)width height:(CGFloat)height num:(CGFloat)num;
// 创建既能输入又能下拉的组合框
//- (void)createCommbox:(NSString*)placeholder _rect:(CGRect)_rect maxLength:(int)maxLength control:(RootViewController*)control view:(UIView*)view callback:(ResponseCallback)callback text:(NSString*)text panelFrame:(CGRect)panelFrame isInput:(BOOL)isInput align:(NSTextAlignment)align;
// 分享
//+ (void)share:(NSString*)title content:(NSString*)content url:(NSString*)url image:(id)image view:(UIView*)view control:(RootViewController*)control;
//创建一个一个的线性按钮


@end
